package com.jt.www.domain.enums.common;

/**
 * 险种
 *
 * @author lq
 * @create 2019-10-29 17:33
 */
public enum CategoryEnum {
    CATEGORY_XZ("校责险", "riskTimeSlot_1", "zrx_1"),
    CATEGORY_SZ("实责险", "riskTimeSlot_2", "zrx_1"),
    CATEGORY_YW("意外险", "riskTimeSlot_3", "ywx_1");

    private String name;
    private String code;
    private String caseCode;

    CategoryEnum(String name, String code, String caseCode) {
        this.name = name;
        this.code = code;
        this.caseCode = caseCode;
    }

    public static String getCaseCode(String code) {
        for (CategoryEnum e : CategoryEnum.values()) {
            if (e.code.equals(code)) {
                return e.caseCode;
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public String getCaseCode() {
        return caseCode;
    }
}
